<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>原生javascript贪吃蛇</title>
<style>
.map { width: 800px; height: 800px; overflow:hidden; position: relative; background: gray;}
.score { position: absolute; left: 850px; top:20px; width: 200px;}
.score .num { font-size: 24px;}
</style>
</head>
<body>
<div class="map"></div>
<div class="score">
    <p>游戏提示： 上下左右键控制方向，ener键控制暂停或者开始</p>
    <h3>当前得分</h3>
    <p class="num">---</p>
</div>

<script src="food.js"></script>
<script src="snake.js"></script>
<script src="game.js"></script>
<script>
    var game = new Game(document.querySelector('.map'), document.querySelector('.num'));
    game.init();
</script>
</body>
</html>